package com.powernode.feign;

import com.powernode.domain.Basket;
import com.powernode.feign.hystrix.OrderCartFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 内容:
 * 作者: cy
 */
@FeignClient(value = "cart-service", fallback = OrderCartFeignHystrix.class)
public interface OrderCartFeign {


    @GetMapping("p/shopCart/getBasketsByIds")
    List<Basket> getBasketsByIds(@RequestParam List<Long> basketIds);


    @PostMapping("p/shopCart/clearCart")
    Boolean clearCart(@RequestBody List<Long> skuIds, @RequestParam String openId);

}
